<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!--
/**
 * OrangeHRM is a comprehensive Human Resource Management (HRM) System that captures
 * all the essential functionalities required for any enterprise.
 * Copyright (C) 2006 OrangeHRM Inc., http://www.orangehrm.com
 *
 * OrangeHRM is free software; you can redistribute it and/or modify it under the terms of
 * the GNU General Public License as published by the Free Software Foundation; either
 * version 2 of the License, or (at your option) any later version.
 *
 * OrangeHRM is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
 * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 * See the GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License along with this program;
 * if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
 * Boston, MA  02110-1301, USA
 *
 */
-->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>OrangeHRM Installation Guide</title>
<link href="./style.css" rel="stylesheet" type="text/css" />
<link href="favicon.ico" rel="icon" type="image/gif" />
</head>

<body>
<div id="content">
<h1>Installation Guide</h1>
<!-- Contents -->

<div id="contents" class="section">
<h2>Contents</h2>
<p>
<ol class="content_table">
	<li><a href="#overview">Overview</a></li>
	<li><a href="#pre-requisites">Pre-requisites</a>
	<ol class="content_table_sub">
		<li><a href="#windows">AMP stack for Windows</a></li>
		<li><a href="#linux">AMP stack for Linux</a></li>
	</ol>
	</li>
	<li><a href="#installation">Installation</a>
	<ol class="content_table_sub">
		<li><a href="#copying">Copying files</a></li>
		<li><a href="#extracting">Extracting</a></li>
	</ol>
	</li>
	<li><a href="#webinstallation">Web Installation</a>
	<ol class="content_table_sub">
		<li><a href="#welcome">Welcome Screen</a></li>
		<li><a href="#license">License Acceptance</a></li>
		<li><a href="#systemChk">System Check</a></li>
		<li><a href="#DBCreation">Database Creation</a></li>
		<li><a href="#adminUsrCrt">Admin User Creation</a></li>
		<li><a href="#confirm">Confirmation</a></li>
		<li><a href="#installing">Installing</a></li>
		<li><a href="#registration">Registration</a></li>
	</ol>
	</li>
</ol>
</p>

<div class="navigate"><a href="javascript:window.history.go(-1);"><img
	src="../images/back.gif" width="15" height="15" border="0" class="back" /></a>
<a href="#"><img src="../images/top.gif" width="15" height="15"
	border="0" class="top" /></a></div>
</div>
<!-- Overview -->

<h2>Who Should Read This Guide</h2>
<p>This guide is meant for users using the in-built Web-Installer(a
step-by-step installation/configuration wizard), which is the default
and recommended method of installing OrangeHRM. However technical users
who wish to manually configure OrangeHRM can refer the <a class="see"
	href="../../faq.html">OrangeHRM FAQ</a>.</p>
<div id="overview" class="section">
<h2>Overview</h2>
<p>This Guide describes how to install OrangeHRM. It is intended
for experienced administrators and novices alike. After installation,
you can configure users and do other administrative tasks. To install
OrangeHRM, ensure that you have the appropriate Pre-requisites: See
<a href="#pre-requisites" class="see">Pre-requisites</a></p>

<div class="navigate"><a href="javascript:window.history.go(-1);"><img
	src="../images/back.gif" width="15" height="15" border="0" class="back" /></a>
<a href="#"><img src="../images/top.gif" width="15" height="15"
	border="0" class="top" /></a></div>

</div>

<!-- Pre-requisites -->

<div id="pre-requisites" class="section">
<h2>Pre-requisites</h2>
<p>The pre-requisites are;
<ul>
	<li>Apache HTTP Server 1.3 or later</li>
	<li>MySQL 5.1.6 or later</li>
	<li>PHP 5.3.0 or later</li>
</ul>
</p>
<p>If you already have Apache HTTP web server (and PHP5 loaded as an
Apache Module) and MySQL running, then you have everything you need.
(Note: OrangeHRM requires PHP5)</p>
<p>In case you don't have the requisites setup, you have two options.

<ul>
	<li>
		Use OrangeHRM Appliance for Windows. Just install and use. 
		
		</li>
	<li>Use an AMP stack which has Apache, MySQL and PHP
	pre-configured to work together. See <a href="#windows" class="see">AMP
	stack for Windows</a> if you are using Windows or else if you are using
	Linux, <a href="#linux" class="see">AMP stack for Linux</a>.</li>
	<li>If you want you could configure Apache, MySQL and PHP on you
	own manually. You can refer the <a class="see" target="_blank"
		href="../../faq.html">OrangeHRM FAQ</a> on how to install/configure
	them.</li>
</ul>
</p>



<!-- Pre-requisites - windows -->

<div id="windows">
<h3>AMP stack for Windows</h3>
<br/>
<div class="warning">
	Remember to enable InnoDB support. 
	See <a href="#howToEnableInnoDB" class="see">How to enable InnoDB support in MySQL</a>.
</div>
<p><cite>Recommended AMP stack for Windows is <a
	href="http://www.apachefriends.org/en/xampp-windows.html#641"
	class="external" target="_blank">XAMPP Windows 1.7.7</a></cite></p>
<p><b>Notice:</b> make sure you download the Installer from the
Basic Package and not the upgrades, developer packs, etc.</p>

<p>After downloading, start installing XAMPP for Windows.
<ul>
	<li>You can choose the default installation location and click
	Next</li>
	<li>When asked to "Install XAMPP Servers (Apache, MySQL, .....) as
	service?", select Yes</li>
	<li>When asked "Install Apache 2 as service?", select Yes</li>
	<li>When asked "Install MySQL as service?", select Yes</li>
	<li>You may skip the other services by selecting no since they are
	not required for OrangeHRM</li>
	<li>Select Yes to start the XAMPP control panel too.</li>
</ul>
</p>
<p><b>Notice:</b><br>
<ul>
	<li>If you use any firewall software (ie; Windows Firewall) if
	prompted please make sure that XAMPP services (Apache Web Server,
	MySQL) are exempted from the blocked list.</li>
	<li>If you use Skype, this may result in a port conflict with
	Apache web-server included in XAMPP. Therefore make sure
	you re-start Windows to make sure that XAMPP services start before
	Skype (then Skype will go for another free port).</li>
</ul>

</p>
</div>

<!-- pre-requisites - windows -->

<div id="linux">
<h3>AMP stack for Linux</h3>
<div class="warning">
	Remember to enable InnoDB support. 
	See <a href="#howToEnableInnoDB" class="see">How to enable InnoDB support in MySQL</a>.
</div>
<p><cite> Recommended AMP stack for Linux is <a
	href="http://www.apachefriends.org/en/xampp-linux.html#374"
	class="external" target="_blank">XAMPP Linux 1.7.7 </a></cite></p>
<p><b>Notice:</b> make sure you download complete stack(usually the
biggest download out of the lot) and not the upgrades, developer packs,
etc.</p>
<p>After downloading, install XAMPP Linux. Follow the instructions
that comes with XAMPP Linux or given in the XAMPP site.</p>
<cite> Remember to start the stack. </cite>


<div class="notes">
<h4>Notes</h4>
<p>You will have to change the ownership of OrangeHRM files to <span
	class="code">nobody.nobody</span><br />
Type the following in the shell. <span class="code">&lt;orangehrm&gt;</span>
is the path where the OrangeHRM files are located. <br />
Ex. /opt/xampp/htdocs/orangehrm-[version_no]/</p>
<p class="bash">$ chown -R nobody.nobody &lt;orangehrm&gt;</p>
</div>

<p>Please remember the location you installed XAMPP. It will be
required later.</p>
</div>

<div class="navigate"><a href="javascript:window.history.go(-1);"><img
	src="../images/back.gif" width="15" height="15" border="0" class="back" /></a>
<a href="#"><img src="../images/top.gif" width="15" height="15"
	border="0" class="top" /></a></div>

</div>

<!-- Installation -->

<div id="installation" class="section">
<h2>Installation</h2>
<h3 id="copying">Copying files</h3>
<p>Copy <span class="code">OrangeHRM-[version_no].zip</span> into the
document root of the Apache HTTP Server.</p>

<div class="notes">
<h4>Notes</h4>
<p>If you used XAMPP for Windows, document root is <br />
<p class="bash">&lt;XAMPP Installed Location&gt;\htdocs\</p>
</p>
<p class="bash">ex. C:\Program Files\xampp\htdocs</p>
</p>
<p>If you used XAMPP Linux AMP stack, document root is <br />
<p class="bash">&lt;XAMPP Installed Location&gt;/htdocs/</p>
</p>
</div>

<h3 id="extracting">Extracting</h3>
<p>Extract <span class="code">OrangeHRM-[version_no].zip</span> into the
same folder, which would extract everything into a directory called
'orangehrm-[version_no]'.</p>

<h3>Web Installation</h3>
<p>Using a JavaScript enabled browser go to <span class="code">http://&lt;webhost&gt;/orangehrm-[version_no]/</span><br />
<br />
Where <span class="code">&lt;webhost&gt;</span> is <span class="code">localhost</span>
if it is installed in the machine you are currenty working on, IP
address if it is remotely hosted (i.e. external to the machine you are
using.) <br />
<br />
See <a href="#webinstallation" class="see">Web Installation</a>.</p>

<div class="notes">
<h4>Recommended Browsers</h4>
<p>
<ul>
	<li><a href="http://www.mozilla.com/firefox/" class="external"
		target="_blank">Mozilla Firefox</a> 12.</li>
	<li>Microsoft<sup>&reg;</sup> Internet Explorer 9.</li>
</ul>
</p>
</div>
<br />
<div class="navigate"><a href="javascript:window.history.go(-1);"><img
	src="../images/back.gif" width="15" height="15" border="0" class="back" /></a>
<a href="#"><img src="../images/top.gif" width="15" height="15"
	border="0" class="top" /></a></div>

</div>

<!-- Web Installation -->

<div id="webinstallation" class="section">
<h2>Web Installation</h2>
<p>Web installation will be briefly described here.</p>

<h3 id="welcome">Welcome Screen</h3>
<p>It will state which version of OrangeHRM will be installed and
briefly what it would be doing to install OrangeHRM</p>
<p>Click <b>[Next]</b> button in the Welcome screen to proceed with
the installation.</p>
<div class="screenshot"><img src="../images/welcome.png"
	alt="Please refer the INSTALL.HTM in OrangeHRM source for pictures"
	width="797" height="325" /></div>

<h3 id="license">License Acceptance</h3>

<p>Here you will be provided with a copy of the <a
	href="http://www.gnu.org/licenses/gpl-2.0.html" class="external"
	target="_blank">GNU GENERAL PUBLIC LICENSE</a> and to continue the
installation you will have to accept the license. If you decline simply
discontinue the installation and delete all OrangeHRM files you posses.</p>

<div class="screenshot"><img src="../images/license.png"
	alt="Please refer the INSTALL.HTM in OrangeHRM source for pictures"
	width="797" height="400" /></div>

<p>Click <b>[I Accept]</b> button in the License Acceptance screen
if you accept the terms and conditions of the license. Then you will be
taken to the next page of the Web Installer.</p>

<div class="navigate"><a href="javascript:window.history.go(-1);"><img
	src="../images/back.gif" width="15" height="15" border="0" class="back" /></a>
<a href="#"><img src="../images/top.gif" width="15" height="15"
	border="0" class="top" /></a></div>

<h3 id="systemChk">System Check</h3>

<p>Here the Web Installer will check whether the <a
	href="#pre-requisites" class="see">Pre-requisites</a> are available.</p>

<p>If all responses are in green you can safely continue. You have
installed the correct versions of the pre-requisites and configured
them to work in harmony.</p>

<p>See below for all the possible color codes.<br />
<br />
<div class="screenshot"><img src="../images/system_check_01.gif"
	alt="Please refer the INSTALL.HTM in OrangeHRM source for pictures"
	width="797" height="188" /></div>
<p class="caption">Rare occurrence where all three states are in the
same screen.</p>
</p>

<p>Click <b>[Next]</b> button in the System Check screen to
continue.</p>

<div class="screenshot"><img src="../images/systemcheck.png"
	alt="Please refer the INSTALL.HTM in OrangeHRM source for pictures"
	width="797" height="400" /></div>

<div class="notes">
<h4>OrangeHRM Configuration File  Writeable</h4>
<p>The web installer will create a configuration file to keep the setup information.
 This file is written to the file system at the end of the installation process. Therefore 
 adequate permission should be set for the web server to write to the file.</p> 
 
 <p>In case the status is shown as &quot;Not  Writeable&quot; you should set the permissions 
 such that the user-id set for the web server could write to the directory 
 [orangehrm-dir]/lib/confs. This can be done by using the commands</p>
 
 <p class="bash">$ chown -R nobody.nobody [orangehrm-dir]/lib/confs<br>
 $ chmod -R 755 [orangehrm-dir]/lib/confs</p>
 
 <p>You can replace user/user-group &quot;nobody&quot; with the relevant user/user-group
 of your web server.</p>
 
<h4>Maximum Session Idle Time before Timeout</h4>
<p>Maximum Session Idle Time before Timeout is checked to ensure
that users don't get logged out within a short period such as less than
15 minutes. As a precaution it's not possible to continue installing
OrangeHRM if the session times out in less than 2 minutes.</p>
<h5>How to Fix</h5>
<p>You will have to change <span class="code">session.gc_maxlifetime</span>
in the <span class="code">php.ini</span> file. (Default <span
	class="code">session.gc_maxlifetime = 1440</span>)</p>
<h5>Important</h5>
<p>It is still possible that some other php application running in
the same server is overriding <span class="code">session.gc_maxlifetime</span>
value in the <span class="code">php.ini</span> file at runtime. This
will be the case if you are running OrangeHRM in a shared host.
Workaround is available but beyond the scope of this document.</p>

<h4>Memory allocated for PHP script</h4>
<p>OrangeHRM recommends 16MB memory to be allocated for running PHP scripts.
If you are warned of having any less allocation than that, you fix the issue by 
opening your PHP.INI file and setting the memory_limit value</p>

<p class="bash">memory_limit = 16M;</p>
<h4 id="howToEnableInnoDB">How to enable InnoDB support in MySQL</h4>
<p>To enable "InnoDB" please open "my" (or "my.cnf") file in a text editor and search for "skip-innodb" and add the leading "#" and restart the MySQL database server to enable InnoDB.</p>  
<p class="bash">
ex: <br>
.<br>
.<br>
.<br>
skip-innodb<br>
.<br>
.<br>
.<br>
should read as<br> 
.<br>
.<br>
.<br>
#skip-innodb<br>
.<br>
.<br>
.<br/>
</p>

<h4 id="howToEnableEventScheduler">How to enable event scheduler in MySQL</h4>
<p>To enable "event_scheduler" please open "my" (or "my.cnf") file in a text editor and add the text "event_scheduler=ON" under "Basic Settings" section and restart the MySQL server.</p>
<p class="bash">
[mysqld]<br>
#<br>
# * Basic Settings<br>
#<br>
event_scheduler=ON#<br>
#<br>
</p>

<p>(in XAMPP for windows my.cnf is found in C:\xampp\mysql\bin\my.cnf)<br>
(in XAMPP for linux my.cnf is found in /opt/lampp/etc/my.cnf)
</p>
</div>


<div class="navigate"><a href="javascript:window.history.go(-1);"><img
	src="../images/back.gif" width="15" height="15" border="0" class="back" /></a>
<a href="#"><img src="../images/top.gif" width="15" height="15"
	border="0" class="top" /></a></div>

<h3 id="DBCreation">Database Creation</h3>

<div class="screenshot"><img src="../images/database.png"
	alt="Please refer the INSTALL.HTM in OrangeHRM source for pictures"
	width="797" height="400" /></div>

<p>Enter the relevant information about your MySQL database server
and database users.<br />
Click <b>[Next]</b> in Database Creation screen to continue.</p>


<div class="notes">
<h4>Notes</h4>

<h5>Privileged Database Users and OrangeHRM Database Users</h5>
<p>Database Server users could be assigned different rights. For the
web installer to create the OrangeHRM Database, you need to give a
Database user account details (user-name/password) with permissions
CREATE, ALTER, DROP, INSERT under the field Privileged Database
User/Password.</p>
<p>Since OrangeHRM requires only permissions INSERT, UPDATE, SELECT
and DELETE to interact with database, the web installer could create a
separate database user account to for OrangeHRM. It is always
recommended that you create a separate user account for OrangeHRM. To do
so fill in OrangeHRM User details(user-name/password) as required
 and the web-installer would create the account for you.</p>
<p><b>Note:</b> Since the database user account details used by
OrangeHRM are stored in plain text, it would be a security threat to
have OrangeHRM use Privileged user account.</p>
</div>

<h3 id="adminUsrCrt">Admin User Creation</h3>

<div class="screenshot"><img src="../images/admincreation.png"
	alt="Please refer the INSTALL.HTM in OrangeHRM source for pictures"
	width="575" height="325" /></div>

<p>Type in the Admin Username, Password and Confirm Admin User
Password.<br />
Click <b>[Next]</b> button in Admin User Creation Screen to continue.</p>

<div class="navigate"><a href="javascript:window.history.go(-1);"><img
	src="../images/back.gif" width="15" height="15" border="0" class="back" /></a>
<a href="#"><img src="../images/top.gif" width="15" height="15"
	border="0" class="top" /></a></div>

<h3 id="confirm">Confirmation</h3>

<div class="screenshot"><img src="../images/confirmation.png"
	alt="Please refer the INSTALL.HTM in OrangeHRM source for pictures"
	width="575" height="325" /></div>

<p>Confirm whether the installation details are correct and Click <b>[Install]</b>
button in the Confirmation screen to install.</p>

<div class="notes">
<h4>Notes</h4>

<p>Installation will begin immediately. Once you click <b>[install]</b>
there is no way that you can stop the installation from starting. You
cannot roll back the installation as well. Click <b>[Install]</b> only
if you are sure that you want to install with the given configuration</p>
</div>

<h3 id="installing">Installing</h3>

<p>Here you will be shown the progress of the installation. Once the
installation is completed the <b>[Next]</b> button will be enabled.
Click <b>[Next]</b> button in the Installing screen to continue.</p>

<p>If an error occurs during the installation the whole installation
will be aborted. <br />
Click <b>[Clean Up Install]</b> to go to previous pages to correct the
error and start the installation again. See <a href="#installing_error"
	class="see">screen shots</a></p>

<div class="notes">
<h4>Notes</h4>

<p>If the installation is aborted you will have to either DROP the
database with the name you provided in the <a href="#DBCreation"
	class="see">Database Creation</a> page if it exists or key in another
name for the database.</p>
</div>

<div class="navigate"><a href="javascript:window.history.go(-1);"><img
	src="../images/back.gif" width="15" height="15" border="0" class="back" /></a>
<a href="#"><img src="../images/top.gif" width="15" height="15"
	border="0" class="top" /></a></div>

<p><a href="#registration" class="skip">[Skip screen shots]</a></p>

<h4>Following are sample screen shots of the Installing screen</h4>

<div class="screenshot"><img src="../images/installing_01.gif"
	alt="Please refer the INSTALL.HTM in OrangeHRM source for pictures"
	width="588" height="323" /></div>
<p class="caption">Installation has just started.</p>
<div class="navigate"><a href="javascript:window.history.go(-1);"><img
	src="../images/back.gif" width="15" height="15" border="0" class="back" /></a>
<a href="#"><img src="../images/top.gif" width="15" height="15"
	border="0" class="top" /></a></div>
<br />
<br />

<div class="screenshot"><img src="../images/installing_02.gif"
	alt="Please refer the INSTALL.HTM in OrangeHRM source for pictures"
	width="575" height="325" /></div>
<p class="caption">Installation in progress.</p>
<div class="navigate"><a href="javascript:window.history.go(-1);"><img
	src="../images/back.gif" width="15" height="15" border="0" class="back" /></a>
<a href="#"><img src="../images/top.gif" width="15" height="15"
	border="0" class="top" /></a></div>
<br />
<br />

<div class="screenshot"><img src="../images/installing_03.gif"
	alt="Please refer the INSTALL.HTM in OrangeHRM source for pictures"
	width="321" height="344" /></div>
<p class="caption">Installation has finished successfully.</p>
<div class="navigate"><a href="javascript:window.history.go(-1);"><img
	src="../images/back.gif" width="15" height="15" border="0" class="back" /></a>
<a href="#"><img src="../images/top.gif" width="15" height="15"
	border="0" class="top" /></a></div>
<br />
<br />

<div class="screenshot" id="installing_error"><img
	src="../images/installing_error_01.gif"
	alt="Please refer the INSTALL.HTM in OrangeHRM source for pictures"
	width="750" height="340" /></div>
<p class="caption">Installation has been aborted due to an error.</p>
<div class="navigate"><a href="javascript:window.history.go(-1);"><img
	src="../images/back.gif" width="15" height="15" border="0" class="back" /></a>
<a href="#"><img src="../images/top.gif" width="15" height="15"
	border="0" class="top" /></a></div>
<br />

<h3 id="registration">Registration</h3>

<div class="screenshot"><img src="../images/registration.png"
	alt="Please refer the INSTALL.HTM in OrangeHRM source for pictures"
	width="797" height="400" /></div>

<p>If you want be up to date on news about OrangeHRM, please provide
your e-mail address and a name that the e-mails should be addressed to. It
will be much appreciated if you register here, then we will know how
many users have successfully installed OrangeHRM.</p>
<p>You can also provide your comments.
<p>
<p>If you want to receive updates or newsletter select the tick box
<b>[Updates/Newsletter].</b> Click <b>[Register]</b> to send the
information.</p>
<p>If the registration is successful you can click <b>[Login to
OrangeHRM]</b> to Login to OrangeHRM.</p>
<p>If you don't want to register click <b>[No thanks!]</b>.</p>

<div class="notes">
<h4>Notes</h4>

<p>If the sending of registration Information fails an error message
will be shown. Click <b>[Retry]</b> to send the details again or <b>[Skip]</b>
to skip this step and you will not be registered.</p>
</div>
<br />

<h3>Login into OrangeHRM</h3>
<p>Now use the Admin Username and Password you have given earlier to
login into OrangeHRM.</p>

<div class="screenshot"><img src="../images/login.png"
	alt="Please refer the INSTALL.HTM in OrangeHRM source for pictures"
	width="700" height="400" /></div>

<div class="navigate"><a href="javascript:window.history.go(-1);"><img
	src="../images/back.gif" width="15" height="15" border="0" class="back" /></a>
<a href="#"><img src="../images/top.gif" width="15" height="15"
	border="0" class="top" /></a></div>

</div>
<div id="footer">OrangeHRM ver 3.1.1<br/>
&copy; 2005 - 2013 <a href="http://www.orangehrm.com" target="_blank">OrangeHRM, Inc</a>. All rights reserved.
</div>
</div>
</body>
</html>
